<?php
global $SMARTY,$DBobject,$CONFIG;

$articleId = $_GET['articleid'];
if (!empty($articleId)) {
    $sqlArticle = "SELECT * FROM tbl_news_management  WHERE deleted IS NULL AND publish = '1' AND id = $articleId ";
    $articleInfo = $DBobject->executeSQL($sqlArticle);
    $SMARTY->assign("articleInfo", unclean($articleInfo));
    $titleId =  $articleInfo['0']['news_title_id'];
    //主标题查询
    $sqlTitle = "SELECT * FROM tbl_news_title WHERE deleted IS NULL AND id = $titleId ";
    $tabs = $DBobject->executeSQL($sqlTitle);
    $SMARTY->assign("tabs", unclean($tabs));
} else {
    $err = [
        'data' => '数据获取失败,请重新获取'
    ];
    $SMARTY->assign("err", unclean($err));
}

